public with sharing class ReplyCommentForLead_Case {
    public String replyResult {get;set;}
    public String wbid{get;set;}
    public String content{get;set;}
    public Lead lead {get;set;}
    
    public ReplyCommentForLead_Case(ApexPages.StandardController stdController) {
        lead = (Lead)stdController.getRecord();
        
    }
       
    public void ReplyComment(){
            
            String strMID = [Select M_ID__c From Lead where Id=:lead.Id].M_ID__c;
            
            content= ApexPages.currentPage().getParameters().get('Content');
            
            //得到接收发送对象的方法。            
            WB_OpenApi.WB_Comment_Create_In wbc_in = new WB_OpenApi.WB_Comment_Create_In();
            
            //给ID负值，用来拼接URL的参数
            wbc_in.id = strMID;
          
            //给回复的内容负值
            wbc_in.comment = content;

            String jsonResult = wbc_in.toRequestURL();
            
        
            if( jsonResult.contains( content) ){
                replyResult = '【Reply Content】: '+content;
                system.debug('@@@@@@@@@@@@@@@@@@@'+replyResult);
            }else{
                replyResult = 'reply failure!';
                system.debug('@@@@@@@@@@@@@@@@@@@'+replyResult);
            }
           
            
    }
               
    
}